package org.neframework.test.core;

import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;

import org.apache.commons.io.FileUtils;

import com.alibaba.fastjson.JSONArray;

/**
 * 备份工具类
 * 
 * @author 冯晓东
 *
 */
public class RestoreTools {

	public static void main(String[] args) throws IOException {

	}

	public static JSONArray getServerDatabase() {
		String dataFile = "f:\\tmp\\data.txt";
		String data = null;
		try {
			data = FileUtils.readFileToString(new File(dataFile));
		} catch (IOException e) {
			e.printStackTrace();
		}
		// System.err.println(data);
		JSONArray tableList = JSONArray.parseArray(data);
		System.err.println(tableList);
		return tableList;
	}

	// 分析数据库变动
	public static void anysisDatabaseChange() {
		List<Map<String, Object>> localDatabase = BackupTools.getDatabaseInfo();
		JSONArray serverDatabase = getServerDatabase();
		
		
		

	}// #anysisDatabaseChange

}
